<html>
<head>
<title>Hello Ajax version 3</title>
<style type='text/css'>
* {
	font-family: Tahoma, Arial, sans-serif;
}

#helloTitle {
	color: #48f;
}
</style>
<script type='text/javascript' src='../../js/prototype/prototype.js'></script>
<script type='text/javascript'>
	window.onload = function() {
		$('helloBtn').onclick = function() {
			var name = $('helloTxt').value;
			new Ajax.Request("hello3.jsp?name=" + encodeURI(name), {
				method : "get",
				onComplete : function(xhr) {
					eval(xhr.responseText);
					//                    eval("$('helloTitle').innerHTML=\"<h1>Hello, <b><i>\"+\"asdas\"+\"</i></b></h1>\";");
				}
			});
		}
	}
</script>
</head>
<body>
	<div id='helloTitle'>
		<h1>Hello, stranger</h1>
	</div>
	<p>Please introduce yourself by entering your name in the box below</p>
	<input type='text' size='24' id='helloTxt'></input>&nbsp;
	<button id='helloBtn'>Submit</button>
</body>
</html>